//
//  LoginModel.h
//  Tiipvi
//
//  Created by xiaowuxiaowu on 2017/5/2.
//  Copyright © 2017年 xiaowuxiaowu. All rights reserved.
//

#define kLogin_user_phone @"kLogin_user_phone"
#define kLogin_user_pass @"kLogin_user_pass"
#define kLogin_user_loginType @"kLogin_user_loginType"
#import <Foundation/Foundation.h>

typedef NS_ENUM(NSInteger,OtherLoginType) {
    
    OtherLoginTypeDefaultPsw = 1,
    OtherLoginTypeCode,
    OtherLoginTypeWechat,
};
typedef NS_ENUM(NSInteger,LoginSexType) {
    
    LoginSexTypeBoy = 1,
    LoginSexTypeGirl,
    
};

@interface LoginModel : NSObject


@property (nonatomic,copy)NSString *access_token;
@property (nonatomic, copy) NSString * refreshToken;

@property (nonatomic, strong) NSString * head;
//@property (nonatomic, strong) Log * logs;
@property (nonatomic, strong) NSString * mobile;
@property (nonatomic, strong) NSString * alias;
@property (nonatomic, strong) NSString * sex;
@property (nonatomic, assign) NSInteger userId;
@property (nonatomic, strong) NSString * user_name;
//@property (nonatomic, assign) LoginSexType sex;
@property (nonatomic, copy)NSString *has_password;//@"yes" : @"no" //神奇的返回数据
@property (nonatomic,assign)BOOL isSetPsw;

@property (nonatomic,assign)BOOL isLogin;
@property (nonatomic, copy) NSString *pass;
@property (nonatomic, assign) BOOL isBoy;
@property (nonatomic, assign)OtherLoginType loginType;



+(instancetype)shareLoginModel;


+(void)LoginSuccess:(NSDictionary *)dict type:(OtherLoginType)type;

-(void)getLoginModel; //获取本地
-(void)getInfoModel; //获取个人信息
-(void)save;
-(void)clear;


@end



BOOL tp_isLogin();
